package com.tdp.neo4j;

import org.springframework.data.neo4j.annotation.EndNode;
import org.springframework.data.neo4j.annotation.Fetch;
import org.springframework.data.neo4j.annotation.GraphId;
import org.springframework.data.neo4j.annotation.RelationshipEntity;
import org.springframework.data.neo4j.annotation.StartNode;

@RelationshipEntity(type="COOP")
public class Cooperations {
	@GraphId 
	Long id;
	
	private double prob=0;
	@StartNode 
//	@Fetch
	private Authors author1;
	@EndNode
//	@Fetch
	private Authors author2;
	
	
	
	public Cooperations() {
	    // TODO Auto-generated constructor stub
    }

	public Cooperations(Authors author1, Authors author2, double prob) {
		this.author1 = author1;
		this.author2 = author2;
		this.prob = prob;
	}

	public Cooperations(Authors author1, Authors author2) {
		this.author1 = author1;
		this.author2 = author2;
		this.prob = 0;
	}

	public double getProb() {
		return prob;
	}

	public void setProb(double prob) {
		this.prob = prob;
	}

	public Authors getAuthor1() {
		return author1;
	}

	public void setAuthor1(Authors author1) {
		this.author1 = author1;
	}

	public Authors getAuthor2() {
		return author2;
	}

	public void setAuthor2(Authors author2) {
		this.author2 = author2;
	}

}
